<?php
namespace app\admin\controller;
use think\Controller;
use think\auth\Auth;
class Base extends Controller{
	public function _initialize(){
		$module=request()->module();
		$controller=request()->controller();
		$action=request()->action();
		$auth=new Auth();
		$uid=session('uid');
		if($uid){
		  if(!$auth->check($module.'/'.$controller.'/'.$action,$uid)){
			$this->error("你没有权限");
		  }
	  }else{
	  	$this->error('你没有登录','/');
	  }
	}
}
?>